PATHMac OS 8 and 9 Developer Documentation > Networking and Communications > URL Access Manager >

Transferring Files With the URL Access Manager


Open Flag Constants

The URL Access Manager defines constants that you can use to specify options for downloading data from a URL or for uploading data to a URL. The constants for specifying these options are defined in the URLOpenFlags enumeration.

enum
{
    kURLReplaceExistingFlag         = 1 << 0,
    URLRBinHexFileFlag              = 1 << 1,
    kURLExpandFileFlag              = 1 << 2,
    kURLDisplayProgressFlag         = 1 << 3,
    kURLDisplayAuthFlag             = 1 << 4,
    KURLUploadFlag                  = 1 << 5,
    kURLIsDirectoryHintFlag         = 1 << 6,
    kURLDoNotTryAnonymousFlag       = 1 << 7,
    kURLDirectoryListingFlag        = 1 << 8
    };
typedef UInt32 URLOpenFlags;

Constant Descriptions

kURLReplaceExistingFileFlag
If the bit accessed by this flag is set and the specified file or directory already exists, the contents of the specified file or directory are replaced by the newly downloaded or uploaded data. If this bit is not set, the name of the file or directory isn't specified, and the file or directory already exists, a number is appended to the name before any extension until a unique name is created, and the data is downloaded or uploaded to the new file or directory name without notifying the calling application that the name has changed. In the case of a download operation, your application can check the file specification to obtain the new file name.
kURLBinHexFileFlag
If the bit accessed by this flag is set, the URL Access Manager converts the file to BinHex format before it uploads a file that is not of type `TEXT' and that has a resource fork.
kURLExpandFileFlag
If the bit accessed by this flag is set, files in BinHex format are decoded. If the Stuffit Engine is installed in the System Folder, it is used to expand the file in any way supported by Stuffit.
kURLDisplayProgressFlag
If the bit accessed by this flag is set, URLSimpleDownload , URLSimpleUpload , URLDownload , and URLUpload display a progress indicator in a modal dialog box during the download or upload operation.
kURLDisplayAuthFlag
If the bit accessed by this flag is set, a modal authentication dialog box is displayed if authentication is required.
kURLUploadFlag
If the bit accessed by this flag is set, URLOpen uploads data to the specified URL.
kURLIsDirectoryHintFlag
If the bit accessed by this flag is set, the URL Access Manager assumes that the URL points to a directory (for download operations only).
kURLDoNotTryAnonymousFlag
If the bit accessed by this flag is set and if kURLDisplayAuth is set, URLDownload , URLUpload , URLSimpleDownload and URLSimpleUpload do not try to log on to FTP servers anonymously. Instead, they immediately display an authentication dialog box. If this bit is not set, URLDownload , URLUpload , URLSimpleDownload and URLSimpleUpload first attempt to log on to FTP servers anonymously.
kURLDirectoryListingFlag
If the bit accessed by this flag is set, a listing of the directory is downloaded instead of the entire directory. If the URL points to a file instead of a directory, the file is downloaded.

© 1999 Apple Computer, Inc. – (Last Updated 07 May 99)